﻿using System;
using System.Web.Mvc;

using mvcForum.Web.Controllers;
using mvcForum.Core.Interfaces.Services;

namespace mvcForum.Web.Areas.ForumAPI.Controllers {

	public class RoleController : BaseAPIController {
		private readonly IMembershipService membershipService;

		public RoleController(IMembershipService membershipService) {
			this.membershipService = membershipService;
		}

		public ActionResult List(String mode) {
			String[] roles = this.membershipService.GetAllRoles();
			return this.CustomJson(new { Roles = roles });
		}
	}
}